package com.example.demothree.service;

import com.example.demothree.bean.Goods;
import com.example.demothree.bean.PurchaseItem;
import com.example.demothree.bean.PurchaseOrder;
import com.example.demothree.bean.ReturnOrder;
import com.example.demothree.exception.ServiceException;
import org.springframework.data.domain.Page;

public interface PurService {
    //采购订单
    public Page<PurchaseOrder> purcgdd(Integer pageNum,Integer pageSize);
    //id查询订单
    public PurchaseOrder findById(Long id);
    //添加订单
    public PurchaseOrder adddd(PurchaseOrder purchaseOrder);
    //采购退货
    public Page<ReturnOrder> purcgth(Integer page, Integer size);
    //根据id查询退货订单
    public ReturnOrder getIdcgdd(Long id);
    //添加退货订单
    public ReturnOrder addcgth(ReturnOrder returnOrder);
    //删除退货订单
    public void deletecgth(Long id);
    //删除采购订单
    public void deletucgdd(Long id);
    //添加订单
    public ReturnOrder addcgdd(ReturnOrder returnOrder);
    //修改订单
    public ReturnOrder updatecgdd(ReturnOrder returnOrder);
    //添加商品
    public Goods saveGoods(Goods goods) throws Exception;
    //添加商品
    public PurchaseItem savePurchaseItem(PurchaseItem purchaseItem);
    //name查询商品
    public Goods findByName(String name);
}
